<% if attachments.any? %>
  <% attachments.each do |key, val| %>
    <div style="display:inline-block;">
      <% if    object["type"] == :attachment %>
        <%= object["object"].try(:asset_link, val[:filename] ) %>
        
      <% elsif object["type"] == :repository %>
        <%= object["object"].try(:asset_link, object["path"], object["rev"], val[:filename] ) %>
        
      <% end %>
    </div>
  <% end %>
<% end %>